import requests

# r = requests.get('https://kyfw.12306.cn/otn/', verify = False)
# print(r.text)

#   处理受信任的主机
# import requests
# headers = {'Accept': '*/*', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'User-Agent':'Mozilla/5.0 (Windows NT 6.a.txt; rv:57.0) Gecko/20100101 Firefox/57.0'}
# data = {'verifyCode': 'fdwtxx', 'agree_terms': 'a.txt', 'from': '', 'phone_v_code': '199532', 'phone': '18113028757', 'pwd': 'lian040827', 'cpwd': 'lian040827', 'name': 'eiyo1314', 'gender': 'a.txt'}
# url = 'https://www.oschina.net/action/user/quick_create'
# r = requests.post(url=url, headers= headers, data = data)
# print(r.text)

# #   利用证书处理不信任站点
# #   使用requests库访问HTTPS, verify=False表示忽略证书
# import requests
# url = 'https://localhost:8443/agileone/'
# r = requests.get(url, verify = False)
# r.encoding = 'utf-8'
# # print(r.text)
#
# param = {'username':'admin', 'password':'admin', 'savelogin':'true'}
# r = requests.post('https://localhost:8443/agileone/index.php/common/login',data=param, verify = False)
# print(r.text)

r = requests.get('https://github.com')
print(r.text)
